home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / NONPORT.ZIP / CURSOFF.C < prev    next >
Text File  |  1992-11-21  |  1KB  |  52 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef cursoff
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_cursoff = "$Header: c:/curses/nonport/RCS/cursoff.c%v 2.0 1992/11/15 03:18:26 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   cursoff()    - Turns off the hardware cursor.
  15.  
  16.   PDCurses Description:
  17.        Turns off the hardware curses, it does nothing if it is already off.
  18.  
  19.   PDCurses Return Value:
  20.        Returns OK upon success, ERR upon failure.
  21.  
  22.   PDCurses Errors:
  23.        ERR will be returned (in the case of FLEXOS) if the hardware cursor
  24.        can not be disabled.
  25.  
  26.   Portability:
  27.        PDCurses        int cursoff( void );
  28.  
  29. **man-end**********************************************************************/
  30.  
  31. int    cursoff(void)
  32. {
  33.        if      (_cursvar.visible_cursor)
  34.        {
  35.                _cursvar.visible_cursor = FALSE;
  36. #ifdef     OS2
  37.                PDC_set_cursor_mode(32, 33);    /* turn it off */
  38. #else
  39.                switch (_cursvar.adapter)
  40.                {
  41.                case _FLEXOS:
  42.                        PDC_set_cursor_mode(_cursvar.visible_cursor, 0);
  43.                        break;
  44.                default:
  45.                        PDC_set_cursor_mode(32, 33);    /* turn it off */
  46.                        break;
  47.                }
  48. #endif
  49.        }
  50.        return( OK );
  51. }
  52.